package me.vico.config;

import me.vico.bean.Fox;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author Vico
 * @date 2020/8/10 10:53
 */

@ComponentScan("me.vico.test2")
@Configuration
public class AppConfig2 {

    /**
     * 使用加载创建bean，并设置创建bean的方法和销毁bean的方法
     * @return
     */
    @Bean(initMethod="initxml",destroyMethod = "destroyxml")
    public Fox fox(){
        return new Fox();
    }


}